package com.ittest.app;

import com.ittest.bean.service.BookService;
import com.ittest.config.SpringConfig7;
import com.ittest.config.SpringConfig8;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App8 {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(SpringConfig8.class);//扫描配置类，和扫描配置文件new的对象不一样
        BookService bookservice = ctx.getBean("bookService", BookService.class);
        bookservice.check();

    }
}
